import java.util.Scanner;

public class test5 {
    public static void main(String[] args) {
       Scanner sc = new Scanner(System.in);
       double a = sc.nextDouble();
       double b = sc.nextDouble();
       double c = sc.nextDouble();
       int d = sc.nextInt();
       int e = sc.nextInt();
        System.out.println(sum(d,e));
        System.out.println(sum(a,b,c));
    }
    public static int sum(int a, int b) {
        return a + b;
    }
    public static double sum(double a, double b, double c) {
        return a + b + c;
    }

}
